package com.fduss.artStore.dao;

import com.fduss.artStore.entity.CustomerLogon;

/**
 * @Author duocai wu
 * @Date 2017/6/23
 * @Time 17:05
 */
public interface CustomerLogonDao {

    /**
     * maybe used for register
     * @param customerLogon
     * @return
     */
    CustomerLogon add(CustomerLogon customerLogon);

    void delete(int customerId);

    CustomerLogon update(CustomerLogon customerLogon);

    boolean updatePassword(int customerId, String newPass);

    /**
     *  maybe used for login
     * @param userName
     * @param pass
     * @return
     */
    CustomerLogon getOne(String userName, String pass);

    CustomerLogon getOne(int customId);

    boolean exists(String userName);
}
